@extends('host.common.store.common')
@section('content')

    {{--商品的id--}}
    <input type="hidden" value="{{$goods->id}}" id="goods_id">

    <link rel="stylesheet" href="/assets/b2b/js/MagicZoom/css/ShopShow.css">
    <link rel="stylesheet" href="/assets/b2b/js/MagicZoom/magiczoom.css">
    <div class="shop-details-right ml20 fl">
        <div id="ncs-goods-picture" class="ncs-goods-picture image_zoom fl">

            <div id="shopContainer">

                <div id="imgs">
                    <a href="" class="MagicZoom" id="MagicZoom"
                       rel="zoom-position: right; zoom-width: 450px; zoom-height: 450px; loading-msg:加载中; hint-text:; zoom-distance:30">
                        <img src="{{$goods->goodsImage()->first()->image}}"/></a>
                </div>

                <div id="picContainer">
                    <div id="imgSL"></div>
                    <div id="imgSR"></div>
                    <div id="imgSCon">
                        <div class="wrap">

                        </div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>

        </div>
        <div id="hidden_form" style="display: none"></div>

        <div id="shop_details" class="fl clearfix">

        </div>
        <div class="ncs-goods-main fl mt20" id="main-nav-holder">
            <nav class="tabbar pngFix" id="main-nav">
                <div class="ncs-goods-title-nav">
                    <ul id="categorymenu">
                        <li class="current">
                            <a id="tabGoodsIntro" href="#content">商品详情</a>
                        </li>
                        <li>
                            <a id="tabGoodsRate" href="#content">商品评价</a>
                        </li>
                        <li>
                            <a id="tabGoodsTraded" href="#content">销售记录</a>
                        </li>
                        <li>
                            <a id="tabGoodsConsult" href="#content">商品咨询</a>
                        </li>
                    </ul>

                </div>
            </nav>
            <div class="ncs-intro">
                <div class="content bd" id="ncGoodsIntro">

                    <ul class="nc-goods-sort">
                        <div class="ncs-goods-info-content">
                            <!-- 商品详情 -->
                            <div class="default tc tabGoodsIntro">
                                @foreach( $goods->goodsImage as $image)
                                    <img src="{{$image->image}}"
                                         alt="image"><br/>

                                @endforeach
                            </div>
                            <!-- 商品评价 -->
                            <div class="default tabGoodsRate" style="display: none">
                                <div class="clearfix  rate-box">
                                    <div class="rate-title clearfix mr15 ml20">
                                        <div class="rate-title-name f14 c-333 fl lh40">重庆咖啡公司</div>
                                        <div class="rate-title-main fl">
                                                            <span class="b002 f14 lh32" style="width: 300px">
                                                            <span class="reputation"></span>
                                                            好评
                                                        </span>
                                        </div>
                                        <div class="rate-title-right fl c-999 lh32">2015-10-23 10:50</div>
                                    </div>
                                    <div class="rate-main lh50 f14 c-999 ml20">商品服务非常捉到，产品质量也很不错。</div>
                                </div>
                                <div class="clearfix  rate-box">
                                    <div class="rate-title clearfix mr15 ml20">
                                        <div class="rate-title-name f14 c-333 fl lh40">重庆咖啡公司</div>
                                        <div class="rate-title-main fl">
                                                        <span class="b002 f14 lh32" style="width: 300px">
                                                            <span class="reputation"></span>
                                                            好评
                                                        </span>
                                        </div>
                                        <div class="rate-title-right fl c-999 lh32">2015-10-23 10:50</div>
                                    </div>
                                    <div class="rate-main lh50 f14 c-999 ml20">商品服务非常捉到，产品质量也很不错。</div>
                                </div>
                                <div class="clearfix  rate-box">
                                    <div class="rate-title clearfix mr15 ml20">
                                        <div class="rate-title-name f14 c-333 fl lh40">重庆咖啡公司</div>
                                        <div class="rate-title-main fl">
                                                        <span class="b002 f14 lh32" style="width: 300px">
                                                            <span class="reputation"></span>
                                                            好评
                                                        </span>
                                        </div>
                                        <div class="rate-title-right fl c-999 lh32">2015-10-23 10:50</div>
                                    </div>
                                    <div class="rate-main lh50 f14 c-999 ml20">商品服务非常捉到，产品质量也很不错。</div>
                                </div>
                                <div class="clearfix  rate-box">
                                    <div class="rate-title clearfix mr15 ml20">
                                        <div class="rate-title-name f14 c-333 fl lh40">重庆咖啡公司</div>
                                        <div class="rate-title-main fl">
                                                        <span class="b002 f14 lh32" style="width: 300px">
                                                            <span class="reputation"></span>
                                                            好评
                                                        </span>
                                        </div>
                                        <div class="rate-title-right fl c-999 lh32">2015-10-23 10:50</div>
                                    </div>
                                    <div class="rate-main lh50 f14 c-999 ml20">商品服务非常捉到，产品质量也很不错。</div>
                                </div>
                                <div id="comm-paging" class="comm-paging" style="float: right;"></div>
                            </div>
                            <!-- 销售记录 -->
                            <div class="default tabGoodsTraded" style="display: none">
                                <div class="clearfix">
                                    <div class="head">
                                        <ul class="clearfix">
                                            <li class="c-999 purchase-name">采购公司名称</li>
                                            <li class="c-999 purchase-num">采购数量</li>
                                            <li class="c-999 purchase-time">采购时间</li>
                                        </ul>
                                    </div>
                                    <div class="traded-main">
                                        <ul class="clearfix">
                                            <li class="c-999 purchase-name">重庆咖啡有限公司</li>
                                            <li class="c-999 purchase-num">1000</li>
                                            <li class="c-999 purchase-time">2015-10-23</li>
                                        </ul>
                                    </div>
                                    <div class="traded-main">
                                        <ul class="clearfix">
                                            <li class="c-999 purchase-name">重庆咖啡有限公司</li>
                                            <li class="c-999 purchase-num">1000</li>
                                            <li class="c-999 purchase-time">2015-10-23</li>
                                        </ul>
                                    </div>
                                    <div class="traded-main">
                                        <ul class="clearfix">
                                            <li class="c-999 purchase-name">重庆咖啡有限公司</li>
                                            <li class="c-999 purchase-num">1000</li>
                                            <li class="c-999 purchase-time">2015-10-23</li>
                                        </ul>
                                    </div>
                                    <div class="traded-main">
                                        <ul class="clearfix">
                                            <li class="c-999 purchase-name">重庆咖啡有限公司</li>
                                            <li class="c-999 purchase-num">1000</li>
                                            <li class="c-999 purchase-time">2015-10-23</li>
                                        </ul>
                                    </div>
                                </div>
                                <div id="comm-paging" class="comm-paging" style="float: right;"></div>
                            </div>
                            <!-- 商品咨询 -->
                            <div class="default tabGoodsConsult" style="display: none">
                                <div class="clearfix ml50 mt50">
                                    <div class="consult-title fl f14 c-666 ">我要咨询：</div>
                                    <div class="textarea-main fl clearfix">
                                        <textarea id="textarea_content"></textarea>

                                        <div class="fl wbb validate-box mt30">
                                            <div class="fl lh32 f14 c-666">验证码：</div>
                                            <div class="fl">
                                                <input type="text"></div>
                                            <div class="fl ml10">
                                                <a href="javascript:void(0);">
                                                    <img src="{{ route('captcha.generate', ['custom']) }}"
                                                         style="margin-left: 20px; cursor: pointer;" title="点击刷新验证码"
                                                         onclick="this.src='{{ route('captcha.generate', ['custom']) }}?v=' + Math.random() * 10">

                                                </a>
                                            </div>
                                            <div class="fl release-radio lh32 ml45 f14 c-666">
                                                <label for="cryptonym" class="lh32 ml45 f14 c-666">
                                                    <input type="radio" id="cryptonym" name="release" value="1">匿名发布
                                                </label>
                                            </div>
                                            <div class="release-btn fl ml20">
                                                <span class="btn btn-red btn-w110x32" id="release_consult">发布</span>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ul>
                </div>
            </div>
        </div>
    </div>


    <script type="text/template" id="details-templ">
        <%_.each(obj,function(item) {%>
        <div class="s-d ml20 fl">
            <div class="s-d-title f18 c-coffee lh30"><%=item.name%></div>
            <div class="s-d-list mt40 clearfix">
                <div class="clearfix">
                    <div class="sd-list-l c-999 fl f14 tr lh32">采&nbsp;&nbsp;&nbsp;购&nbsp;&nbsp;&nbsp;价：</div>
                    <div class="sd-list-r c-yer fl f14 wb80 lh32 purchase-price" code="<%=item.code%>"><%=item.price%></div>
                </div>
                <div class="clearfix">
                    <div class="sd-list-l c-999 fl f14 tr lh32">起&nbsp;&nbsp;&nbsp;订&nbsp;&nbsp;&nbsp;量：</div>
                    <div class="sd-list-r c-666 fl f14 wb80 lh32"><span id="minimum_order" class="f14"><%=item.minimum_order%></span>件</div>
                </div>
                <div class="clearfix">
                    <div class="sd-list-l c-999 fl f14 tr lh32">销&nbsp;&nbsp;&nbsp;售&nbsp;&nbsp;&nbsp;量：</div>
                    <div class="sd-list-r c-666 fl f14 wb80 lh32">已售出<%=item.minimum_order%>件</div>
                </div>
                <div class="clearfix">
                    <div class="sd-list-l c-999 fl f14 tr lh32">所 在 地 区：</div>
                    <div class="sd-list-r c-666 fl f14 wb80 lh32">
                        <%=item.addr%>
                    </div>
                </div>
                <div class="clearfix">
                    <div class="sd-list-l c-999 fl f14 tr lh32">产 品 规 格：</div>
                    <div class="sd-list-r c-999 fl f14 wb80 lh32">
                        <div class="spec" id="shop_spec">
                            <a href="javascript:void(0)" class="lh32 f14 tc" code="1" stock="1" articlenumber="1" price="1" id="" specid="122"><%=item.specid%></a>
                        </div>
                    </div>
                </div>
                <div class="clearfix mt40">
                    <div class="sd-list-l c-999 fl f14 tr lh32">采 购 数 量：</div>
                    <div class="sd-list-r c-999 fl f14 wb80 lh32">
                        <div class="spec clearfix">
                            <div class="spec-inp clearfix fl" style="width: 124px;">
                                <input type="text" id="buynum" value="1"></div>
                            <div class="ml10 lh40 f14 fl">
                                件(
                                <span class="c-yer f14" id="stock_num" ><%=item.stock%></span>
                                件可售)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix mt15">
                    <div class="sd-list-l c-999 fl f14 tr lh32">您 已 选 择：</div>
                    <div class="sd-list-r c-999 fl f14 wb80 lh32">
                        <div class="spec" >
                            <a href="javascript:void(0)" class="lh32 f14 tc c-yer" id="chose_shop"></a>
                        </div>
                    </div>
                </div>
                <div class="clearfix mt15">
                    <div class="shop-t-btn">
                        <div class="btn btn-red btn-w180x50 lh35 fl" id="buynow_submit" code="<%=item.code%>">立即购买</div>
                        <div class="btn btn-coffee btn-w180x50 lh35 ml20 fl" id="add_shopping_cart">加入购物车</div>
                        <div class="fl ml40">
                            <a href="javascript:void(0)">
                                <span class="five-pointed fl"></span>
                            </a>
                            <a href="javascript:void(0)" class="lh45 f14 c-999 ml5">收藏</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%})%>
    </script>

    <script type="text/template" id="addr-dialog-templ">
        <div class="dialog-div">
            <div class="tc c-666 f14">该商品已成功加入购物车!</div>
            <div class="dialog-btn tc mt40">
                <a class="btn btn-warn btn-w140x40 f16" href="{{route('cart.cart-list')}}">查看购物车</a>
            </div>
        </div>
    </script>

    <script src="/assets/b2b/js/pageModules/common/C15.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/MagicZoom/magiczoom.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/MagicZoom/js/ShopShow.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/dialog-min.js"></script>
 @stop